package de.edb.dto;

import java.text.SimpleDateFormat;
import de.edb.model.Artist;
import de.edb.model.Event;

/**
 * Data transfer object used to represent a special version of Event including a
 * Location and Artist
 */

public class EventLocationArtistDTO {
	private String aname;
	private String lname;
	private String ename;
	private String ebegin;
	private String eend;

	public EventLocationArtistDTO(Event e, Artist a) {
		SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy HH:mm");
		aname = a.getName();
		ename = e.getName();
		ebegin = sdf.format(e.getBegin());
		eend = sdf.format(e.getEnd());
		lname = e.getLocation().getName();
	}

	public String getName() {
		return aname;
	}

	public String getLocation() {
		return lname;
	}

	public String getBegin() {
		return ebegin;
	}

	public String getEnd() {
		return eend;
	}

	public String getEvent() {
		return ename;
	}
}